package com.cn.service.server.Equipment.Impl;

import com.cn.bean.pojo.bc.User;
import com.cn.bean.pojo.lbj.ComponentSingleRegistrationTable;
import com.cn.bean.pojo.lbj.SingleParameterItemCurrentDataTable;
import com.cn.bean.pojo.workOrder.BusinessItemWorkOrderPool;
import com.cn.bean.pojo.workOrder.GrindingResultMainTable;
import com.cn.bean.pojo.workOrder.GrindingResultSubTable;
import com.cn.mapper.dao.db5.Equipment.GrindingResultDao;
import com.cn.service.server.Equipment.GrindingResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GrindingResultServiceImpl implements GrindingResultService {
    @Autowired(required = false)
    private GrindingResultDao grindingResultDao;
    @Override
    public List<BusinessItemWorkOrderPool> selectGrindingWorkOrder(String workOrderCode, int page, int limit) {
        return grindingResultDao.selectGrindingWorkOrder(workOrderCode,page,limit);
    }

    @Override
    public List<GrindingResultMainTable> selectGrindingResultMain(GrindingResultMainTable grindingResultMainTable) {
        return grindingResultDao.selectGrindingResultMain(grindingResultMainTable);
    }

    @Override
    public List<GrindingResultMainTable> selectGrindingResultMainAll(GrindingResultMainTable grindingResultMainTable) {
        return grindingResultDao.selectGrindingResultMainAll(grindingResultMainTable);
    }

    @Override
    public List<GrindingResultMainTable> selectGrindingResultMainAl(GrindingResultMainTable grindingResultMainTable) {
        return grindingResultDao.selectGrindingResultMainAl(grindingResultMainTable);
    }

    @Override
    public List<GrindingResultMainTable> selectGrindingResultMainA(int workOrderNumber) {
        return grindingResultDao.selectGrindingResultMainA(workOrderNumber);
    }

    @Override
    public List<User> selectWorker(User user) {
        return grindingResultDao.selectWorker(user);
    }

    @Override
    public List<SingleParameterItemCurrentDataTable> selectCurrentDataTable(SingleParameterItemCurrentDataTable singleParameterItemCurrentDataTable) {
        return grindingResultDao.selectCurrentDataTable(singleParameterItemCurrentDataTable);
    }

    @Override
    public List<SingleParameterItemCurrentDataTable> selectCurrentDataTableAll(String partSingleID) {
        return grindingResultDao.selectCurrentDataTableAll(partSingleID);
    }

    @Override
    public List<ComponentSingleRegistrationTable> selectComponentSingleMain( int page, int limit,String uniqueCode) {
        return grindingResultDao.selectComponentSingleMain(page,limit,uniqueCode);
    }

    @Override
    public List<GrindingResultSubTable> selectGrindingResultSub(GrindingResultSubTable grindingResultSubTable) {
        return grindingResultDao.selectGrindingResultSub(grindingResultSubTable);
    }

    @Override
    public List<GrindingResultSubTable> selectGrindingSub(int id) {
        return grindingResultDao.selectGrindingSub(id);
    }

    @Override
    public List<ComponentSingleRegistrationTable> selectComponentSingleMainAll(ComponentSingleRegistrationTable componentSingleRegistrationTable) {
        return grindingResultDao.selectComponentSingleMainAll(componentSingleRegistrationTable);
    }

    @Override
    public int updateCurrentDataTable(SingleParameterItemCurrentDataTable singleParameterItemCurrentDataTable) {
        Boolean g=grindingResultDao.updateCurrentDataTable(singleParameterItemCurrentDataTable);
        if(g){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertGrindingResultMain(GrindingResultMainTable grindingResultMainTable) {
        Boolean a=grindingResultDao.insertGrindingResultMain(grindingResultMainTable);
        if(a){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertGrindingResultSub(GrindingResultSubTable grindingResultSubTable) {
        Boolean b=grindingResultDao.insertGrindingResultSub(grindingResultSubTable);
        if(b){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateGrindingAudit(int id) {
        Boolean c=grindingResultDao.updateGrindingAudit(id);
        if(c){
            return 1;
        }
        return 0;
    }

    @Override
    public int delGrindingSub(int id) {
        Boolean n=grindingResultDao.delGrindingSub(id);
        if(n){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateComponentSingleRegistration(String uniqueCode) {
        Boolean m=grindingResultDao.updateComponentSingleRegistration(uniqueCode);
        if(m){
            return 1;
        }
        return 0;
    }

    @Override
    public int BfComponentSingleStatus(String uniqueCode) {
        Boolean z=grindingResultDao.BfComponentSingleStatus(uniqueCode);
        if(z){
            return 1;
        }
        return 0;
    }

    @Override
    public Integer getGrindingWorkOrderAutoid() {
        return grindingResultDao.getGrindingWorkOrderAutoid();
    }

    @Override
    public Integer getGrindingResultSubTableAutoid() {
        return grindingResultDao.getGrindingResultSubTableAutoid();
    }

    @Override
    public int delGrindingAudit(int id) {
        Boolean e=grindingResultDao.delGrindingAudit(id);
        if(e){
            return 1;
        }
        return 0;
    }

    @Override
    public int delGrindingSign(int id) {
        Boolean n=grindingResultDao.delGrindingSign(id);
        if(n){
            return 1;
        }
        return 0;
    }

    @Override
    public int addGrindingSign(int id) {
        Boolean m=grindingResultDao.addGrindingSign(id);
        if(m){
            return 1;
        }
        return 0;
    }

    @Override
    public int addGrindingSubSign(int id) {
        Boolean p=grindingResultDao.addGrindingSubSign(id);
        if(p){
            return 1;
        }
        return 0;
    }

    @Override
    public int delGrindingSubSign(int id) {
        Boolean j=grindingResultDao.delGrindingSubSign(id);
        if(j){
            return 1;
        }
        return 0;
    }
}
